package com.lvbaoins.Harmony.quartz.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lvbaoins.Harmony.quartz.domain.SysJobLog;
import com.lvbaoins.Harmony.quartz.mapper.SysJobLogMapper;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 定时任务日志 服务
 * </p>
 *
 * @author gjb
 * @Date 2020-09-15 14:17:29
 */
@Service
public class SysJobLogService extends ServiceImpl<SysJobLogMapper, SysJobLog> {


    /**
     * 分页查询
     *
     * @param pageIndex
     * @param limit
     * @param sysJobLog
     * @return
     */
    public IPage<SysJobLog> pageList(Integer pageIndex, Integer limit, SysJobLog sysJobLog) {
        Page page = new Page<SysJobLog>(pageIndex, limit);
        QueryWrapper<SysJobLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("job_log_id");
        return this.page(page, queryWrapper);
    }
}
